{% extends "management/base.html" %}
{% block title %}登陆{% endblock %}

{% block content %}

    <div class="container">
        <div class="row">
            <div class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1">
                {% if state == 'not_exist_or_password_error' %}
                    <div class="well">
                        <h2 class="text-danger text-center">用户不存在或密码错误</h2>
                    </div>
                {% endif %}
                <form method="POST" role="form" class="form-horizontal">
                    {% csrf_token %}
                    <h1 class="form-signin-heading text-center">请登陆</h1>

                    <div class="form-group">
                        <label for="id_user_name" class="col-md-3 control-label">用户名：</label>
                        <div class="col-md-9">
                            <input type="text" class="form-control" id="id_user_name" required name="username"
                                   autofocus>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="id_password" class="col-md-3 control-label">密码：</label>
                        <div class="col-md-9">
                            <input type="password" class="form-control" required name="password" id="id_password">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-4 col-md-offset-4">
                            <button class="btn btn btn-primary btn-block" type="submit">登陆</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

{% endblock %}
